<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <title>JSON</title>
</head>
<body>
<script type="text/xml">
    <person>
        <firstName>John</firstName>
        <lastName>Doe</lastName>
        <age>30</age>
    </person>
</script>
<script>
    var personElement = document.querySelector('person');
    var firstName = personElement.querySelector('firstName').innerHTML;
    var lastName = personElement.querySelector('lastName').innerHTML;
    var age = personElement.querySelector('age').innerHTML;
    var person = {
        firstName: firstName,
        lastName: lastName,
        age: age
    }
</script>
<script type="application/json">
    "JavaScript"
</script>
<script>
    var value = 'JavaScript';
</script>
<script type="application/json">
    10
</script>
<script type="application/json">
    true
</script>
<script type="application/json">
    null
</script>
<script>
    var person = {
        firstName: "John",
        lastName: "Doe",
        age: 30
    }
</script>
<script type="application/json">
    {
        "firstName": "John",
        "lastName": "Doe",
        "age": 30
    }
</script>
<script type="application/json">
    {
        "firstName": "John",
        "lastName": "Doe",
        "age": 30,
        "address": {
            "numberAndStreet": "123 Someplace",
            "city": "Somewhere",
            "state": "Elsewhere"
        }
    }
</script>
<script>
    var values = ['John', 30, false, null];
</script>
<script type="application/json">
    [
        "John",
        30,
        false,
        null
    ]
</script>
<script type="application/json">
    [
        {
            "firstName": "John",
            "lastName": "Doe",
            "age": 30,
            "address": {
                "numberAndStreet": "123 Someplace",
                "city": "Somewhere",
                "state": "Elsewhere"
            }
        },
        {
            "firstName": "Jane",
            "lastName": "Doe",
            "age": 28,
            "address": {
                "numberAndStreet": "246 Someplace",
                "city": "Somewhere",
                "state": "Elsewhere"
            }
        }
    ]
</script>
<script>
    var person = {
        firstName: "John",
        lastName: "Doe",
        age: 30
    };
    var json = JSON.stringify(person);
</script>
<script>
    var johnDoe = JSON.parse(json);
    var fullName = johnDoe.firstName + ' ' + johnDoe.lastName;
</script>
</body>
</html>